home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_325 / dclock / dclock.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  94 lines

  1. /*
  2.  *    DClock.h ------    Rather senseless include file if you don't have the
  3.  *            DClock 'C' source code.
  4.  */
  5.  
  6. #include <intuition/intuitionbase.h>
  7. #include <libraries/dosextens.h>
  8. #include <workbench/workbench.h>
  9. #include <devices/inputevent.h>
  10. #include <graphics/gfxmacros.h>
  11. #include <workbench/startup.h>
  12. #include <graphics/gfxbase.h>
  13. #include <exec/interrupts.h>
  14. #include <devices/input.h>
  15. #include <devices/audio.h>
  16. #include <exec/execbase.h>
  17. #include <exec/memory.h>
  18.  
  19.     /* Forward declarations. */
  20.  
  21. extern struct Library    *OpenLibrary();
  22. extern struct Window    *OpenWindow();
  23. extern struct MsgPort    *CreatePort();
  24. extern struct MsgPort    *FindPort();
  25. extern struct Message    *GetMsg();
  26. extern struct Task    *FindTask();
  27. extern void        *AllocMem();
  28. extern struct IOStdReq    *CreateStdIO();
  29. extern struct TextFont    *OpenFont();
  30. extern ULONG         Wait();
  31. extern ULONG         AvailMem();
  32.  
  33.     /* Global MessagePort identifier. */
  34.  
  35. #define PORTNAME "DPort"
  36.  
  37.     /* Current DClock revision. */
  38.  
  39. #define REVISION 12
  40.  
  41.     /* Raster size macro. */
  42.  
  43. #define Byte(Width) (((Width + 15) >> 4) << 1)
  44.  
  45.     /* Global MessagePort structure. Note: if you are up to
  46.      * expand this structure, add the new identifiers at the
  47.      * bottom. This will insure upward-compatibility with
  48.      * older DClock and DClock-Handler revisions.
  49.      */
  50.  
  51. struct DSeg
  52. {
  53.     /*******************************************
  54.      * Vital data! Don't change ANYTHING here! *
  55.      *******************************************/
  56.  
  57.     struct MsgPort     Port;        /* Global messageport. */
  58.  
  59.     BPTR         Segment;    /* Pointer to handler segment. */
  60.     LONG         SegSize;    /* Size of DSeg structure. */
  61.  
  62.     struct Task    *Father;    /* Calling process. */
  63.     struct Task    *Child;        /* Waiting process (usually handler). */
  64.  
  65.     ULONG         RingBack;    /* Multi-Purpose signal bit. */
  66.  
  67.     ULONG         LastSecs;    /* Timer control. */
  68.     BYTE         Priority;    /* Handler priority. */
  69.     UBYTE         Revision;    /* Could come in handy for future revisions. */
  70.  
  71.     /***********************************************
  72.      * Custom data, open to expansion and changes. *
  73.      ***********************************************/
  74.  
  75.     UBYTE         Beep;        /* Audible beep selected? */
  76.     UBYTE         Click;        /* Keyboard click selected? */
  77.  
  78.     UWORD         ClickVolume;    /* Volume of keyboard click. */
  79.  
  80.     UBYTE         TextColour;    /* Guess what? */
  81.     UBYTE         BackColour;    /* Guess what? */
  82.  
  83.     UBYTE         Alarm;        /* Alarm clock enabled? */
  84.     UBYTE         AlarmHour;    /* Alarm time hour. */
  85.     UBYTE         AlarmMinute;    /* Alarm time minute. */
  86.     UBYTE         AlarmSecond;    /* Alarm time second. */
  87.  
  88.     UBYTE         SetEnv;    /* Set environment variables? */
  89.  
  90.     /***********************************
  91.      * Append your custom flags below. *
  92.      ***********************************/
  93. };
  94.